<template>
  <view class="clear-user-container">
    <view class="logo">
      <u-avatar :src="src" size="200"></u-avatar>
    </view>
    <text class="title">申请注销账号</text>
    <view
      style="background-color:#3745eb;width:220rpx;height:8rpx;margin: 5rpx 0 30rpx 0;"
    ></view>
    <text class="body"
      >账户注销后，优品查会删除你的所有相关信息，保证你的隐私安全～</text
    >
    <u-button type="primary" :custom-style="customStyle" @click="onClick"
      >立即注销账号</u-button
    >
  </view>
</template>

<script>
import { mapActions } from "vuex";
export default {
  data() {
    return {
      src: "",
      // 是否同意协议
      checked: false,

      popupTitle: "",
      customStyle: {
        marginTop: "200rpx",
        width: "80%",
        backgroundColor: "#3745eb",
      },
    };
  },
  onLoad() {},
  methods: {
    ...mapActions("user", ["loginOut"]),
    onClick() {
      this.loginOut('注销成功！');
      // 返回上一页
      uni.navigateBack({
        delta: 1,
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.clear-user-container {
  padding: 0 30rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  margin: 200rpx auto 50rpx auto;
}

.title {
  font-size: 36rpx;
  color: $uni-text-color;
}
</style>
